home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / sync.z / sync
Encoding:
Text File  |  2002-10-03  |  8.5 KB  |  155 lines

  1. SYNC(3I)                                              Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      LLOOCCKK__RREELLEEAASSEE, SSYYNNCCHHRROONNIIZZEE, AANNDD__AANNDD__FFEETTCCHH, AADDDD__AANNDD__FFEETTCCHH,
  6.      CCOOMMPPAARREE__AANNDD__SSWWAAPP, FFEETTCCHH__AANNDD__AADDDD, FFEETTCCHH__AANNDD__AANNDD, FFEETTCCHH__AANNDD__NNAANNDD,
  7.      FFEETTCCHH__AANNDD__OORR, FFEETTCCHH__AANNDD__SSUUBB, FFEETTCCHH__AANNDD__XXOORR, LLOOCCKK__TTEESSTT__AANNDD__SSEETT,
  8.      NNAANNDD__AANNDD__FFEETTCCHH, OORR__AANNDD__FFEETTCCHH, SSUUBB__AANNDD__FFEETTCCHH, XXOORR__AANNDD__FFEETTCCHH, - Fortran
  9.      synchronization intrinsics for multiprocessing
  10.  
  11. SSYYNNOOPPSSIISS
  12.      CCAALLLL LLOOCCKK__RREELLEEAASSEE (([II==]_i))
  13.      CCAALLLL SSYYNNCCHHRROONNIIZZEE
  14.      AADDDD__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
  15.      AANNDD__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
  16.      CCOOMMPPAARREE__AANNDD__SSWWAAPP (([II==]_i,, [JJ==]_j,, [KK==]_k))
  17.      FFEETTCCHH__AANNDD__AADDDD (([II==]_i,, [JJ==]_j))
  18.      FFEETTCCHH__AANNDD__AANNDD (([II==]_i,, [JJ==]_j))
  19.      FFEETTCCHH__AANNDD__NNAANNDD (([II==]_i,, [JJ==]_j))
  20.      FFEETTCCHH__AANNDD__OORR (([II==]_i,, [JJ==]_j))
  21.      FFEETTCCHH__AANNDD__SSUUBB (([II==]_i,, [JJ==]_j))
  22.      FFEETTCCHH__AANNDD__XXOORR (([II==]_i,, [JJ==]_j))
  23.      LLOOCCKK__TTEESSTT__AANNDD__SSEETT (([II==]_i,, [JJ==]_j))
  24.      NNAANNDD__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
  25.      OORR__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
  26.      SSUUBB__AANNDD__FFEETTCCHH (([II==]_i,, [JJ==]_j))
  27.      XXOORR__AANNDD__FFEETTCCHH (([II==_i,, [JJ==]_j))
  28.  
  29. IIMMPPLLEEMMEENNTTAATTIIOONN
  30.      IRIX systems
  31.  
  32.      MIPSpro 7 Fortran 90
  33.  
  34. SSTTAANNDDAARRDDSS
  35.      Fortran extension
  36.  
  37. DDEESSCCRRIIPPTTIIOONN
  38.      The synchronization intrinsics provide a variety of synchronization
  39.      operations.  LLOOCCKK__RREELLEEAASSEE and SSYYNNCCHHRROONNIIZZEE are intrinsic subroutines;
  40.      all the others are elemental intrinsic functions.  These intrinsics
  41.      accept the following arguments:
  42.  
  43.      _i         An integer.  _i must be KIND=4 or KIND=8.
  44.  
  45.      _j         An integer.  _j must be the same kind type as _i.
  46.  
  47.      _k         An integer.  _k must be the same kind type as _i and _j.
  48.  
  49.      The memory barrier intrinsics perform either an acquire barrier,
  50.      release barrier, or full barrier operation.  The operation type and
  51.      the intrinsics that accomplish that type of task are as follows:
  52.  
  53.      TTyyppee                DDeessccrriippttiioonn
  54.  
  55.      Acquire barrier     Prevents the movement of memory references to
  56.                          visible data from after the intrinsic (in program
  57.                          order) to before the intrinsic.  This behavior is
  58.                          desirable for lock-acquire operations.
  59.  
  60.                          Acquire barrier operations can be accomplished by
  61.                          using the LLOOCCKK__TTEESSTT__AANNDD__SSEETT intrinsic subroutine.
  62.                          This subroutine atomically stores the value of the
  63.                          second argument into the first argument.  It
  64.                          returns the old value of the first argument.
  65.  
  66.      Release barrier     Prevents the movement of memory references to
  67.                          visible data from before the intrinsic (in program
  68.                          order) to after the intrinsic.  This behavior is
  69.                          desirable for lock-release operations.
  70.  
  71.                          Release barrier operations can be accomplished by
  72.                          using the LLOOCCKK__RREELLEEAASSEE intrinsic subroutine.  This
  73.                          subroutine sets its argument to zero.
  74.  
  75.      Full barrier        Prevents the movement of memory references to
  76.                          visible data past the intrinsic in either
  77.                          direction.  These act as both an acquire and a
  78.                          release barrier.  A barrier only restricts the
  79.                          movement of memory references to visible data
  80.                          across the intrinsic operation.  Between
  81.                          synchronization operations (or in their absence),
  82.                          memory references to visible data can be freely
  83.                          reordered, subject to the usual data-dependence
  84.                          constraints.
  85.  
  86.                          Full barrier operations are divided into the
  87.                          following groups:
  88.  
  89.                          * Atomic FFEETTCCHH__AANNDD___o_p operations.  The
  90.                            FFEETTCCHH__AANNDD__AADDDD, FFEETTCCHH__AANNDD__AANNDD, FFEETTCCHH__AANNDD__NNAANNDD,
  91.                            FFEETTCCHH__AANNDD__OORR, FFEETTCCHH__AANNDD__SSUUBB, and FFEETTCCHH__AANNDD__XXOORR
  92.                            intrinsic functions perform the operation with
  93.                            the second argument on the first argument.  They
  94.                            return the old value of the first argument.
  95.  
  96.                          * Atomic _o_p__AANNDD__FFEETTCCHH operations.  The
  97.                            AADDDD__AANNDD__FFEETTCCHH, AANNDD__AANNDD__FFEETTCCHH, NNAANNDD__AANNDD__FFEETTCCHH,
  98.                            OORR__AANNDD__FFEETTCCHH, SSUUBB__AANNDD__FFEETTCCHH, and XXOORR__AANNDD__FFEETTCCHH
  99.                            intrinsic functions perform the operation with
  100.                            the second argument on the first argument.  They
  101.                            return the new value of the second argument.
  102.  
  103.                          * Atomic CCOOMMPPAARREE__AANNDD__SSWWAAPP operation.  The
  104.                            CCOOMMPPAARREE__AANNDD__SSWWAAPP intrinsic function compares the
  105.                            value of the first argument to the value of the
  106.                            second.  If they are equal, the value of the
  107.                            third argument is stored into the first and the
  108.                            return value is TRUE.  Otherwise, the return
  109.                            value is FALSE.
  110.  
  111.                          * Atomic SSYYNNCCHHRROONNIIZZEE operation.  This is performed
  112.                            with the SSYYNNCCHHRROONNIIZZEE intrinsic subroutine.
  113.  
  114. RREETTUURRNN VVAALLUUEESS
  115.      The CCOOMMPPAARREE__AANNDD__SSWWAAPP intrinsic function returns TRUE or FALSE.  All
  116.      other intrinsic functions return a value of type integer.  The integer
  117.      values returned are of the same kind type as the arguments provided.
  118.  
  119. NNOOTTEESS
  120.      Each intrinsic possesses two key properties:
  121.  
  122.      * The operation performed is guaranteed to be atomic.  This is
  123.        typically achieved by implementing the operation using a sequence of
  124.        load-linked/store-conditional instructions in a loop.
  125.  
  126.      * Associated with each intrinsic are certain memory barrier properties
  127.        that restrict the movement of memory references to visible data
  128.        across the intrinsic operation (by either the compiler or the
  129.        processor).
  130.  
  131.      A _v_i_s_i_b_l_e _m_e_m_o_r_y _r_e_f_e_r_e_n_c_e is a reference to a data object potentially
  132.      accessible by another thread executing in the same shared address
  133.      space. A visible data object can be one of the following:
  134.  
  135.      * C/C++ global data
  136.  
  137.      * Fortran COMMON data
  138.  
  139.      * VOLATILE data
  140.  
  141.      * Static data (either file-scope or function-scope)
  142.  
  143.      * Data accessible through function parameters
  144.  
  145.      * AUTOMATIC data (local-scope) that has had its address taken and
  146.        assigned to some object that is visible (recursively).
  147.  
  148. CCAAUUTTIIOONNSS
  149.      Conditional execution of a synchronization intrinsic, such as within
  150.      an IF or WHILE block, does not prevent the movement of memory
  151.      references to visible data past the overall IF or WHILE construct.
  152.  
  153. SSEEEE AALLSSOO
  154.      This man page is available only online.
  155.